x86, atomic: Fix 32-bit version of atomic_write64().
authorKeir Fraser <keir@xen.org>
Fri, 17 Dec 2010 14:16:41 +0000 (14:16 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 17 Dec 2010 14:16:41 +0000 (14:16 +0000)
Signed-off-by: Keir Fraser <keir@xen.org>
xen/include/asm-x86/atomic.h

index 30ead03ce73829e154f2aa2d266b32b83306116e..9bf3803cd664a74b5ded07b4a253b716e37307c4 100644 (file)
@@ -36,7 +36,7 @@ static inline uint64_t atomic_read64(const volatile uint64_t *addr)
 static inline void atomic_write64(volatile uint64_t *addr, uint64_t val)
 {
     uint64_t old = *addr, new, *__addr = (uint64_t *)addr;
-    while ( (old = __cmpxchg8b(__addr, old, val)) != old )
+    while ( (new = __cmpxchg8b(__addr, old, val)) != old )
         old = new;
 }
 #endif